package edu.wy.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import edu.wy.entity.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserDao extends BaseMapper<Users> {
    @Select("SELECT * FROM users WHERE username = #{username}")
    Users selectByUsername(String username);

    //创建用户信息
    int addUserByPhone(@Param("user") Users user);

    //修改上次登录时间
    int updateLastLoginTime(@Param("userId") Integer userId);
}
